package com.methods;

/**
 * 测试工作类
 * 2017-08-13
 * @author Erik
 * @version 1.0
 * @since JDK1.8
 */
public class TestWork extends Work{
    private int TestCase;
    private int Bugs;

    public TestWork(){}

    /**
     * 三参数构造
     * @param TC_Num    测试用例数量
     * @param Bug_Num   Bug数量
     * @param name      工作类型名称
     */
    public TestWork(int TC_Num,int Bug_Num,String name){
        this.setName(name);
        this.setBugs(Bug_Num);
        this.setTestCase(TC_Num);
    }

    private void setTestCase(int TC_Num)    {   this.TestCase=TC_Num;   }
    private void setBugs(int bugs)           {   this.Bugs=bugs;   }

    @Override
    public void setName(String name) {  super.setName(name);    }
    public int getTestCase()   {    return this.TestCase;   }
    public int getBugs(){   return this.Bugs;   }

    @Override
    public String getName() {
        return super.getName();
    }

    public String work(){
        String info= this.getName()+"的日报是：今天编写了"+this.getTestCase()+"个测试用例，发现了"
                +this.getBugs()+"个bug";
        return info;
    }
}
